package tabpanel;

import javax.swing.*;

import java.awt.*;
import java.awt.event.*;

import jtable.SimpleTablePanel;

public class Tabs extends JFrame
{

/**
  * constructor
  */
public Tabs()
{

  JTabbedPane tabbedPane = new JTabbedPane();

  SimpleTablePanel simpleTablePanel = new SimpleTablePanel(this);
  tabbedPane.addTab("SimpleTablePanel",  simpleTablePanel);
  tabbedPane.setSelectedIndex(0);

  // Add the tabbed pane to the frame.
  getContentPane().setLayout(new GridLayout(1, 1));
  getContentPane().add(tabbedPane);

  pack();
  setVisible(true);

  addWindowListener(new WindowAdapter()
  {
    public void windowClosing(WindowEvent e) {System.exit(0);}
  });

}

/**
  * main
  */
public static void main(String[] args)
{
  // set look and feel
  try
  {
    UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName());
  }
  catch (Exception ex)
  {
      System.err.println ("Could not swap LookAndFeel");
  }

  new Tabs();  // create the application

}

} // end class

